// blelloch scan 属于exclusive 扫描
    // 时间复杂度为O(logN)
    // 空间复杂度为O(n)
    // 算法描述链接:https://tmramalho.github.io/blog/2014/06/23/parallel-programming-with-opencl-and-python-parallel-scan/#:~:text=The%20Blelloch%20scan%20is%20an%20exclusive%20scan%2C%20which,to%20avoid%20repeating%20summations%20of%20the%20same%20numbers.

#include <iostream>
#include <vector>


int main(int argc, char** argv)
{
    std::cout << "blelloch scan." << std::endl;
     // cpu data
    const int size = 1024;
    std::vector<int> h_data(1024);
    for(int i = 0; i < size; ++i){
        h_data[i] = i;
    }


    // scan result
    std::vector<int> scan(1024);
    scan[0] = 0;
    for(int i = 1; i < size; ++i){
        scan[i] = scan[i-1] + h_data[i -1];
    }

    return 0;
}